-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CreateRemoteThread, WriteProcessMemory and ReadProcessMemory #286
Conversation
I'll check this out. Can you please:
|
…teProcessMemory and ReadProcessMemory Fixed some line formatting issues Added in com.sun.jna.platform.win32.Kernel32: CreateRemoteThread, WriteProcessMemory and ReadProcessMemory Added CreateRemoteThread test
-) CHANGELOG updated |
|
||
HANDLE handle = kernel.OpenProcess(dwDesiredAccess, bInheritHandle, dwProcessId); | ||
|
||
if (handle == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should rewrite this test to be an actual test and to be predictable. Right now if I merge this the build will break. In this case you're trying to open a process, pick a number that you know that doesn't exist and expect the error. This is valid for all the other tests.
You could try to use the current process for the test, for example, or launch a new process.
Bump. |
Sorry for late answer but i was busy. The problem is if I use the current process or launch another, the process will crash cause if I write or read from an address of a process I don't know (or just the address doesn't exist), then it will crash so or so or get Address Violation Exception. |
Why don't you write to an address you know within the current process? |
Yeah, all of this was integrated. |
Added some missing functions in Kernel32.java => CreateRemoteThread, WriteProcessMemory and ReadProcessMemory.
Test-Cases for:
-) WriteProcessMemory
-) ReadProcessMemory
(Wasn´t able to run the tests because somehow i get an error from eclipse about JUnit 3 when i try to run it)
There is no Test-Case for CreateRemoteThread because we need LPTHREAD_START_ROUTINE and also some other functions (that should come also if i have more time, or someone else does it instead of me).
MSDN for CreateRemoteThread: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682437%28v=vs.85%29.aspx